package com.qf.test;

import com.qf.service.UserService;
import com.qf.service.impl.UserServiceImpl;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author 10537
 * @version V1.0
 * @Date 2021/9/28 16:00
 */

public class Demo1 {
    @Test
    public void Demo(){
        ApplicationContext ac=new ClassPathXmlApplicationContext("classpath:applicationContext.xml");

        //$Proxy    代表JDK动态代理
        //JDK动态代理引用方式
        UserService userServiceProxy = (UserService) ac.getBean("userServiceImpl");
        userServiceProxy.save();

        //UserServiceImpl$$EnhancerbySpringCGLIB...  代表CGlib动态代理
        //UserServiceImpl userService= (UserServiceImpl) ac.getBean("userServiceImpl");
        //userService.save();
        System.out.println(1);
    }
}
